<template>
  <iframe id="pageFrame" :src="link" frameborder="0" scrolling="no" :style="{width:width}" />
</template>

<script>
export default {
  props: {
    link: {
      type: String,
      required: true
    },
    width: {
      type: String,
      default: '100%'
    }
  },
  mounted() {
    const oIframe = document.getElementById('pageFrame')
    const deviceHeight = document.documentElement.clientHeight
    oIframe.style.height = (Number(deviceHeight)) + 'px'
  }
}
</script>

<style>

</style>
